Repository navigation
Conversation
… concurrent - Check-in all and refresh credits fan out to every account in one pass: the new bulk endpoints return one result per account with the verbatim upstream error, and the console no longer batches or queues requests. - GET /api/events streams the runtime event bus (account / accounts / quota / checkin / refresh / bulk) with sequence replay. Console pages patch rows live and fall back to a 5s poll when the stream is unavailable. - Check-in results carry the real reward credits plus code and HTTP status, and a provider that reports no status stays "unknown" instead of "success". - Quota is persisted as the real upstream snapshot; force-ready overrides only enter the routing pool and the console badges them. Each quota snapshot states its age, and the synthetic inflight demo board plus its login showcase are gone. - Video, audio and file content parts are refused with a real 400 invalid_request instead of being dropped during prompt assembly, and a shared head timeout makes Trae streams fail over when the upstream accepts a request and stays silent.
Select account cards, confirm, and the console authorizes them one at a time: start the provider login, show the authorization page, poll status, and advance automatically. Cancel stops the walkthrough; every row keeps its own state and the verbatim upstream message.
caigee-cmd
left a comment
There was a problem hiding this comment.
Console and runtime notifications only: /api/events is behind the console key, the bus is in-process and drops a slow subscriber instead of blocking a request, and the in-flight card now follows real requests instead of the local mock. Bulk check-in, probe, quota and re-login report per-account results. No change to routing, retries, cooldowns or billing.
|
合入。只动控制台和运行时通知: |
|
审完了,可以合。 现在合不进去:#602 合入后,这支在 |
caigee-cmd
left a comment
There was a problem hiding this comment.
Re-reviewed against current main. The console half is what I approved: /api/events is behind withConsoleKey, the bus drops a slow subscriber instead of blocking a publish, and the inflight card follows real requests. That part can land.
The branch is merge-dirty (base is ed63b9be, now well behind main) and it is not console-only. Please split these out before rebasing:
rejectUnsupportedMediainValidateChatRequestturns video / audio / file parts into a hard 400. Today those parts are dropped during prompt assembly. That is a gateway behavior change on every provider, not a console fix. It needs its own PR and a decision per provider — Qoder and Trae do not both have the same media story.providers.DoWithHeadTimeouton Trae chat (default 60s,TRAE_STREAM_TTFB_MS) is a second stream clock next to the 5-minute idle guard in #601. Pick one owner. A silent Trae head is worth failing over, but it belongs with the stream-lifetime work, not with the SSE UI.manager_maintenance.go(+225/−128) overlaps #601's check-in rewrite. Rebase will conflict there; don't resolve it by taking both.
refresh-all and the bulk re-login walkthrough look fine once the branch is console-only again. Checkbox fix too.
需要改什么控制台这一半可以留,我也已经 approve 过: 这支现在合不进去,而且不全是控制台。base 是 1. 媒体拒绝从这支拿掉
今天 main 的行为是这些 part 在组 prompt 时被丢掉,请求仍然发出去。改成 400 是所有 provider 的网关行为变化,不是控制台修复。Qoder 和 Trae 对媒体的处理不一样,不能在通用校验里一刀切。 请从这支删除:
媒体要改的话另开一支,按 provider 写:哪一家会静默丢、哪一家上游真的收 image 以外的 part。在那之前保持“丢掉但请求成功”。 2. Trae 首包超时从这支拿掉
resp, err := providers.DoWithHeadTimeout(client, httpReq, providers.HeadTimeoutFromEnv(traeStreamHeadTimeoutEnv, providers.DefaultStreamHeadTimeout))
这是流的寿命,不是 UI。
这支里不要留 3. 签到/维护运行时不要在这支里改调度
这支允许留下的是“把已经发生的结果推到 event bus”:
不允许在这支里改的是“什么时候去领、失败了会不会重试、自动时刻从哪来”。那些留在
4. 控制台这一半 rebase 时保持这些不变量
前端:
5. 拆完之后的验收rebase 到当前
|
Change
Makes the console show what the server is actually doing instead of a locally invented animation, and turns the account batch actions into one guided flow.
/api/events(SSE) streams runtime state changes frominternal/events; the overview in-flight card and account cards subscribe throughuseAccountEventsand drop the mock inflight generator.BatchReloginModal).isSelected/onChangewiring).Scope to review
Verification
go test ./...passes.go build ./...passes.cd frontend && npm run syncrebuiltinternal/webui/static.